package br.com.kisaude.listeners;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.hibernate.annotations.Filter;

import br.com.kisaude.utils.HibernateUtil;

public class HibernateListener implements ServletContextListener {

	public void contextDestroyed(ServletContextEvent arg0) {

		HibernateUtil.getSessionFactory().close();
	}

	public void contextInitialized(ServletContextEvent arg0) {

		HibernateUtil.getSessionFactory();
	}
}
